package com.gewu.pm.ui.activity.funds;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.gewu.pm.R;
import com.gewu.pm.app.AppActivity;
import com.gewu.pm.utils.TextStarUtils;

/**
 * 金豆申请
 */
public class GoldBeanApplyActivity extends AppActivity {
    private TextView tvTerminalLabel;
    private TextView tvNumLabel;
    private TextView tvReasonLabel;
    private TextView tvNameLabel;

    public static void start(Context context) {
        Intent intent = new Intent(context, GoldBeanApplyActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_gold_bean_apply;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        tvTerminalLabel = findViewById(R.id.tv_terminal_label);
        tvNumLabel = findViewById(R.id.tv_num_label);
        tvReasonLabel = findViewById(R.id.tv_reason_label);
        tvNameLabel = findViewById(R.id.tv_name_label);

        // 设置必填标记
        TextStarUtils.setRequiredText(tvTerminalLabel, getString(R.string.terminal_name));
        TextStarUtils.setRequiredText(tvNumLabel, getString(R.string.gold_bean_count_));
        TextStarUtils.setRequiredText(tvReasonLabel, getString(R.string.apply_reason_));
        TextStarUtils.setRequiredText(tvNameLabel, getString(R.string.initiator_));

        setOnClickListener(R.id.rl_terminal, R.id.tv_bottom_button);

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        int id = view.getId();
        if (id == R.id.rl_terminal){
            toast("选择终端");
        } else if (id == R.id.tv_bottom_button){
            toast("提交申请");
        }
    }
}